package cn.tedu.gatewaybejjing.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.ZonedDateTime;

@RestController
@RequestMapping("/bj")
public class BeijingController {
    //获取端口号
    @Value("${server.port}")
    private String port;

    @GetMapping("/hello")
    public String show(){
        //获取断言的时间格式
        System.out.println(ZonedDateTime.now());
        return "北京欢迎您"+",服务端的端口号为："+ port;
    }
}
